package com.group5.onlinegame.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.group5.onlinegame.dao.IRechargeRecordingDao;
import com.group5.onlinegame.entity.Recharge;
import com.group5.onlinegame.entity.RechargeRecording;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.sql.Timestamp;
import java.util.List;

@Service
public class RechargeRecordingService implements IRechargeRecordingService {



    @Resource
    private IRechargeRecordingDao iRechargeRecordingDao;


    @Override
    public PageInfo<RechargeRecording> getRRList(Integer cpage,RechargeRecording rechargeRecording) {
        PageHelper.startPage(cpage,3,"id desc");
        PageInfo<RechargeRecording> pageInfo=new PageInfo<>(iRechargeRecordingDao.gerRRList(rechargeRecording));
        return pageInfo;
    }



    @Override
    public int addRR(RechargeRecording rechargeRecording) {
        return iRechargeRecordingDao.addRR(rechargeRecording);
    }

    @Override
    public int delRR(int[] listid) {
        return iRechargeRecordingDao.delRR(listid);
    }

    @Override
    public int upRR(RechargeRecording rechargeRecording) {
        return iRechargeRecordingDao.upRR(rechargeRecording);
    }






        /*tanc*/

    @Override
    public int getmap(Integer id) {
        return iRechargeRecordingDao.getmap(id);
    }

    @Override
    public List<Timestamp> gettime() {
        return iRechargeRecordingDao.gettime();
    }


}
